<script>
export default {
  props: {
    isShow: {
      type: Boolean,
    }
  },
  data() {
    return {
      info: [
        {
          tag: '姓名',
          content: '戏真好'
        },
        {
          tag: '学号',
          content: '戏真好'
        },
        {
          tag: '性别',
          content: '戏真好'
        },
        {
          tag: '年级',
          content: '戏真好'
        },
        {
          tag: '学院',
          content: '戏真好'
        },
        {
          tag: '专业',
          content: '戏真好'
        },
        {
          tag: '班级',
          content: '戏真好'
        },
      ]
    }
  },
  methods: {
    checkModal() {
      this.$emit('checkModal')
    }
  }
}
</script>

<template>
  <div class="bg" v-show="isShow">
    <div class="modal">
      <div class="button" @click="checkModal">
      <svg
        t="1631370319005"
        class="icon"
        viewBox="0 0 1024 1024"
        version="1.1"
        xmlns="http://www.w3.org/2000/svg"
        p-id="2164"
        width="200"
        height="200"
      >
        <path
          d="M583.168 523.776L958.464 148.48c18.944-18.944 18.944-50.176 0-69.12l-2.048-2.048c-18.944-18.944-50.176-18.944-69.12 0L512 453.12 136.704 77.312c-18.944-18.944-50.176-18.944-69.12 0l-2.048 2.048c-19.456 18.944-19.456 50.176 0 69.12l375.296 375.296L65.536 899.072c-18.944 18.944-18.944 50.176 0 69.12l2.048 2.048c18.944 18.944 50.176 18.944 69.12 0L512 594.944 887.296 970.24c18.944 18.944 50.176 18.944 69.12 0l2.048-2.048c18.944-18.944 18.944-50.176 0-69.12L583.168 523.776z"
          p-id="2165"
        />
      </svg>
    </div>
      <div class="title">个人信息</div>
      <div class="info-container">
        <div class="item" v-for="(item, index) in info" :key="info">
          <div class="tag">{{ `·${item.tag}：` }}</div>
          <div class="content">{{ item.content }}</div>
        </div>
      </div>
    </div>
  </div>
</template>

<style scoped>
.bg {
  z-index: 10;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
}
.modal {
  position: absolute;
  top: 50vh;
  left: 50vw;
  transform: translate(-50%, -50%);
  width: 76%;
  max-height: 70vh;
  background: #fff;
  border-radius: 2.13333vw;
  overflow: hidden;
  padding: 4vw;
}
.title {
  color: #657180;
  font-size: 4.26667vw;
  text-align: center;
  padding-bottom: 4vw;
}
.info-container {
  overflow-y: auto;
}
.item {
  display: flex;
  margin-bottom: 1.66667vw;
  color: #657180;
  font-size: 3.7333vw;
}
.tag {
  margin-right: 1.33333vw;
}
.button {
  position: absolute;
  top: 2.6666vw;
  right: 2.6666vw;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 8vw;
  height: 8vw;
}
.icon {
  width: 4vw;
  height: 4vw;
  fill: #657180;
}
</style>